using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics.PackedVector;

namespace Scurvy.Media
{
    public class VideoStreamReader : ContentTypeReader<Video>
    {
        protected override Video Read(ContentReader input, Video existingInstance)
        {
            int numberofFrames = input.ReadInt32();
            double frameRate = input.ReadDouble();
            Vector2 size = input.ReadVector2();

            return new VideoStream(input, numberofFrames, frameRate, (int)size.Y, (int)size.X, VideoManager._device);
        }
    }
}
